PDF Silent Print
Environment
Product Version | 2018.1 220 |
Product | RadPdfViewer for WinForms |
Problem
You need to print a PDF document without showing it to the user.
Solution
You need to use the DocumentLoaded event because the document is loaded in a separate thread. Once the document is loaded you can call the Print method. The following snippet shows how you can print the document.
PDF Silent Print
If you don't assign the RadPrintDocument.PrintController property, then you get a default print controller. An instance of PrintControllerWithStatusDialog which displays the progress dialog, counting pages. If you don't want to show the small printing dialog counting the pages, you can initialize the RadPrintDocument.PrintController property to a new System.Drawing.Printing.StandardPrintController instance.
Assembly References
If you add the RadPdfViewer at run time you need to add references to the following assemblies:
- Telerik.WinControls.PdfViewer
- Telerik.WinControls
- Telerik.WinControls.UI
- TelerikCommon
- Telerik.Windows.Documents.Fixed
- Telerik.Windows.Documents.Core
- Telerik.Windows.Zip.dll